@efro [GMT -7] accessing player's public account id using sessionplayer.get_v1_account_id()
inside Session.on_player_left
method returns None
(actual) instead of pb-IF5xyz
(expected) when a player leaves the party.
steps to replicate:
1. put this plugin in your mods directory to access player's public account id on player leave:
# ba_meta require api 8
import bascenev1
import babase
original_on_player_leave = bascenev1._session.Session.on_player_leave
def on_player_leave(self, sessionplayer: bascenev1.SessionPlayer, *args, **kwargs) -> None:
pb_id = sessionplayer.get_v1_account_id()
print(pb_id)
original_on_player_leave(self, sessionplayer, *args, **kwargs)
# ba_meta export plugin
class Main(babase.Plugin):
def on_app_running(self):
bascenev1._session.Session.on_player_leave = on_player_leave
2. start the game, launch some minigame/playlist so that this device can act as host.
3. have another other device connect and join into the game hosted by previous device.
4. select leave the party in main menu from this new device.
5. host game prints None
when it should've printed pb-IF5xyz
(as in our plugin above).
i also tried just leaving the game (not the party) from the main menu, this works as expected and prints out pb-IF5xyz
, the above issue is when a player is in game and then immediately leaves the party from the main menu, never noticed this issue before 1.7.20 on api 7 (edited)